﻿(function(E, T, $){
var selection = E.mod('Selection'),
	testName = 'ForeColor',
	title = '字体颜色',
	setValue = ['设置字体颜色', '红色字体', '绿色字体'],
	dom = null,
	node = null,
	cmds = [
		[1500, {fun: function() {
			dom = E.get('document');
			dom.body.innerHTML='<span id="_testForeColor">'+setValue.join(',')+'</span>';
			node = dom.getElementById('_testForeColor');
			selection.selectNode(node,true);
			selection.selectedText(setValue[0]);
		}}],
		[500,{name : '#demo-ForeColor', type: 'mouseover'}],
		[500,{name : '#demo-ForeColor .ForeColor', type: 'click'}],
		[500, {fun: function() {
			selection.selectedText(setValue[1]);
		}}],
		[1000,{name : '#demo-ForeColor .jqe-button-menu', type: 'click'}],
		[1000,{name : '#panel_ForeColor span[color=#FF0000]', type: 'click'}],
		[500, {fun: function() {
			selection.selectedText(setValue[2]);
		}}],
		[1000,{name : '#demo-ForeColor .jqe-button-menu', type: 'click'}],
		[1000,{name : '#panel_ForeColor span[color=#00FF00]', type: 'click'}]
	];

T.addTest(testName, cmds, title);
})(jQEditor,AutoTest, jQuery)